added inputvar rootdir to make subject dir