preliminary timer rewrite