added cgp mim generation