Modified constructor of Transaction