refactored code adding a let statement and self to the break and fix methods