Replaced deprecated method