Revert "Removed dead code"

This reverts commit 55f929e2e2788554342eb3640e0b39cfe60b99d6.