code refactoring, commenting, added buy request