add deprecation notice if old api being used