debug qc samp plots and function