with stream compaction