String Substitution solution