Added sort for class methods