remove redundancy
more readable transaction stream code