working of efficient updating algorithms. Messy