working on substitutions
multiple substitution passes now supported