trying to sort using ArrayLists
started writing code for sortByLocation