modify the deprecated method