Implemented Sort
Added tests for sort