added log for testing
fixed the response parsing