added comments with threading and nested sets