added the function getMaxPower