replace deprecated methods