[state] option to filter the state object before restoring