bug fix and added XML