Use break to exit infinite loop