update function onActivityResult