Adding code for cut and count studies