reordered some functions in the doc to improve readability