use new deprecation API