substitution working