Tapstream patch

rebased