modified generation counting