Existing tests pass, need to test function replace