fixed up for use in insulware. Slight tweak to cmgl and install