thread run method updated