moving some methods to model