be a bit more careful about state