fix API for addState