Where to insert the break; line in my code?