deleted helper method out of model. Not a good solution because it is not generic