Added battery functionality