master worker mostly implemented