a classic wally refactor