Added battery status function