time formated and validation of input done