continued refactoring of model