refactor a messup