more efficient updating