Add generation number method to model