implement output transform stream