Adding starttime and endtime, with validation