changed break criteria