[WIP] replace flat by deep labeling