Application of Kirchhofs rules