Added sort method to algorithms; finished process