adding history to track past iterations