renamed parameter "indir" to "rootdir"