skeleton for sampling code