add two function and modify some buys