make updates happen in one transaction