change deprecated function