implemented basic timer.