avoid using deprecated method