replace calls to deprecated methods with their new calls