solve deprecation warning