added a timer thread