updating use of deprecated method