added statevars to model and rest api