added support to parallel substitutions