change thread to service