transaction function changed