replaced deprecated methods