added a test for mreplace