Add missing function that got lost in the refactoring