still 11 of 12, new subst code for function