add missing function scope