refactor timer class to have an action function in its constructor. now Player has timer object