starting to work on the sorting