implemented transaction merge