use new seq instead of I slice
Merge pull request #751 from huili2/NewSeq_replace_I

use new seq instead of I slice