remove battery dependecy

a small patch to remove dependency on batteries. I had to add only one small function, that should be moved in the helpers file