Changed Thread from extends thread to implements runable