implemented the forst xml method