ncl functions