changed extends thread to implements runnable