modified the mc sample index