Add new method to replace deprecated one.