Revert "Removed old code and replaced with new code"

This reverts commit 1cede315bc8fa16159e26a4ff2ee96f8f882dd0e.