refactor timer to work with more than one object