added calculation for shunt resistor