changed from runnable to thread