replaced subst by dir