adding test cases, with some fixes to time functions