update function in extract