add check for start/end time