Replace a deprecated method