add functions process xml part, fixed functions