proper flatten definition