use np.concatenate to avoid list and array conversion