Added a getWholePotValue function