Flattening 2D Data