adding the remaining codes from the xml chapter