use a ranged for loop; sorting the vector didn't seem like an improvement
unless I'm missing something...