Adding mean calc, related to issue #2