added battery control functions