add the original script containing the array based msg selection method