function update done