added some missing function arguments