modify to remove deprecated method.