doing major surgery to fix compilation error