implement main logic of buying, going to implement cart and UI. :3
refactor testcase