Revert "state api"

This reverts commit 982a8a7e882dd3fdda78ed961ab55d948cceed2c.
revert