updated nls var and formatting