Refactor simple ECB break function