update using range