adds sort method