tidy up
fix missing function