Added support for more than 8 generations