speed fix for optical density & adding calibration