finalized xml reading