fix deprecated method