update state ids