flattened some arrays and shit