Updated response handler