add mean function
fix conflict