fixed: else is executed whenever the for loop runs out of elements, and that's not what we want here