added time validation method