added break functionality