Revert "proper flatten definition"

This reverts commit 244a467ccf9535cb204da46de0d84c459832b502.