logic for parsing xml
fixing merge conflicts