Added start/end time determination