add main code, xml