added functionality to buy specific number of shares