I thought about that and figured I'd refactor it if we found a third place it was needed, but I can do it now instead (it definitely makes this cleaner).