Remove tbb and change to output on row basis