components of electric circuit and their functions