move attribute to model