Using break with nested loops