vastly improved buying and selling methods by refactoring away DB calls