added stock calculation for tax purposes