replace IntSeq with List

can you add your comment above in the code?