start moving messy controller logic into a service