added reference value measuring and OD calculation.