flattens array so we get a new one