Edited Such that end time cannot be earlier than start time