How does the battery control the direction of current