working principle of direct current