added test for udpating states