this should be included in the model, not in the controller