Revert "remove bad code"

This reverts commit 470a7d20e1c5f14f98f3b88dccf55b69be9d2828.