separate out response parsing and a couple other parsing functions