fix deprecated method usage