Sort some functions