fastSubstitute cleaned up