add looping possibility to StreamBuffer