these functions never should have been non-static or in a header file