implemented #with_index and #split_into