define model state in controller