Revert "Deleting the unused code"

This reverts commit 07e22a6955420f0a1fa5c721e05ff3f4ffc4d623.