refactoring. XML parsing is now done in the background