use transaction object (fixed issue #20)