refactored xml