reorder the definition of member functions according to their categories.