Added update function to selection.data