working on transaction handling