Add a set stream function