redisigned for xml parser