modified set_vars to allow for default values if nil