added missing variable 'root'