refactored Average method in PPos