added missing function in api controller