replace missing function def