added handling of wrong time format