refactor models, second commit