change scope declaration to avoid deprecation warning