changed break to continue in loop