fixed typo in nCols function