Added Discrepancy calc
Final version