refactoring, figured out recursive timer, started refactoring