added tests, timer refactor