added streaming support