fixed a problem where i was sorting to many times. I had the sort inside of an iteration when I shouldn't have