modifying scan_vars()