refactor models into a subpackage