Added break

Stops if i > 1000