new thread function for CandidateItemSet
inserted locks and other information
organized code, added options