Revert "fix deprecation warnings"

This reverts commit 40c4ef2c04878a08be6a2064adb982579028281e.