generate instance ids