more refactoring and work in progress on timer id