apple script added for choose index automatically