Revert "removed unnecessary code"

This reverts commit bfb71e37277adedc79fd2e07b2a545e8a6888bb3.