Revert "Revert "clogic is better""

This reverts commit 436408ff011b0eba5dbadf1d8a29fda8426c6f57.