modify deprecation function