update state on import