Adds sorting of resultList using compareTo method