modify transaction logic