Generate ids if passed as true