change deprecated method