changed the definition of subst