Got the initial substitution working