refactor for threading

///< docs for members.