Created getter and setter to control the transaction begin