add buy-records, fixed some bugs, maybe last version more stable