replace some deprecated methods