avoid allocating garbage needlessly