subs function

Substitution