hopefully replaced deprecated code with new code
Revert "hopefully replaced deprecated code with new code"

This reverts commit d4fdfa9aa257dc7d152c662ed2e542aea4f81a06.
Revert "Revert "hopefully replaced deprecated code with new code""

This reverts commit 8703f7e6cae1cf9ee604ccc780d072988dde8d35.