flatten array results