added and implemented timer class