added a missing function to main scope