Add example for flattening