Revert "remove some code, unneeded"

This reverts commit 8a815d45cb24760bff3680c998fee8909bfb32b7.