declare valid_options array before it used