fixing deprecation warning