fixed bugs, new transaction model