add read mean func