slight refactor. getting rid of excess.
xml parsing