modify document: add new slice function Each and ForEach