implements response handler and parser