flatten array result
removed useless variable