Implemented #mean function