made size responsive to output array