s/flags.status/flags.state/ ?