added sort method