added callbacks for shift_segment and crop_segment