refactor models to match new structure