added break and continue
fixed a bug and added tests