Added comment about how sorting is done.