timer class made more concise