added QC code, documentation