Can this logic be moved to the model?