Added parsing of responses from api