Got it right on the first try, you need to be careful not to limit termination in the for loop