working on adding regimes and updated sql models