changed NC logic