fixing deprecation warnings