implemented part of streaming engine