added matrix mean