add missing constant and helper function definitions