using battery for calculations