fix deprecation warnings
fix deprecation warnings