I'm assuming that you have kept the logic the same and just refactored this up to here to make it a little cleaner?