simplified output array creation