added validation for time parametre