rewrite hourtsToSeconds function