fixed IDn and NUM_SAMP