separate models from code