prepare transaction