calculating bleeding resistor