Sorting implemented succesfully