Upgrading deprecated methods