added generation and step counters.