Added substitutions and tests