update using closure