introduce stream API