fixed Mean.scala