add transaction
fix up the behavior of some methods