refactored nms_web