Partially port sample 6.