State type changed to struct