Sorting slices with less lines