put in the controller for now, maybe we should put this in the model