add parameter for setting sampled dimensions.