I added a short bit for timers, you'll need to replace my comments with actual JS code