add xml reading logic