Nice bit of refactoring here!