Move logic into domain layer
Create domain layer function to reduce controller