drying, and adding class methods to model