What a battery charger does whiling charging a battery?