modified the way stocks are added and subtracted