better segmented contol implementation