add statistical measurement function