Refactor this identical block up/out with lines 12-15.