added a changeState event to interact with the state object instead of using viewnavigates