move fix out to its own function