timer var should be global