refactor for threading

Use ///< to document all members.