Changed Transaction.encapsulate() to sumbit()