implement mean calculus for gathered data