changed deprecated method