The second draft

Finish all transactions
The second draft

fix some bugs