replace mhash with hash