Bug fix:
origialString updated to substitutedSubString