Include another function for averaging