remove hard-coding of varDir