move hash to model