tidy up
qc functions