added a function to access the generation number