Had to correct formulas for Slices not Percentage

original formula was thought in slices when converting to code I did
percentage and information was not coming out correctly. Corrected vars
and formulas