Revert "removed unused"

This reverts commit 97ceb3223152743625a488d704c52298acd715ab.
Revert "Revert "removed unused""

This reverts commit 29fc36b8ff4997cfd889e3809702507da831fb48.
flatten