updated the transaction output looping