sort list of collections when creating a graph