Flattening directy structure