improved xml loading