refactoring: fix deprecation warnings