clock class created to replace global clock