change use of deprecated method