sorted the random graph too