added definition for "get_generation"