Added functionality to buy method