Added the option to generate instance ids