changed percentage calc max to accept decimals