forgot global $CFG;