changed the way xml is read