Revert "removed unnecessary code"

This reverts commit 63eb1bbeba8a3388c20b7e4e0acd575e815a8875.