update sampling simulation code