reusing the same temporary array for evaluating shapes