C++ code now working for NCC NP, still need to clean it up a bit