added functionality to buy some number of stocks