This pattern should be moved to a base model.