refactored Global out from NLPMain