add update function on popup