improve xml loading