small changes to model function and model runs