Removed unnecessary sorting