sort method written; tests passed