added global variable 'root'
new directory structure now working