add the cook function, material map, different test case with xml file