edit code change for a deprecation warning