added simple battery sizing function