working on control thread