adding the computation for the average polygon