fixed timer to pass all test cases