replaced deprecated method call