removed if(dir_) scopes