timer class works as it should