update api to have state name within state object