updated calib and calculation algorithems