added functionality of buying and selling shares