Implemented Sorter and tested