including a mean function