move thread out from service