avoiding heap allocation of response