using break instead of continue