changed thread reference scope