added an average Personals Functional

added the math inside the function