Updated Thread with XML parsing