working on the index for stream items