optimize response processing