last_segment & segment_x

adding 2 more variables