Moved sort into it's own method