Update to delete_selection function