replaced deprecated method