calculating NQC in the beginning, once.