reduce timer code duplication + minor edits