Added quantities & fixed buy/sell value function