captured the start and end time from user