then you only really have to handle the last case where the segment will only be partially filled
j
then you only really have to handle the last case where the segment will only be partially filled