Attempting to debug NMS Code