implemented response parsing