ty for your help -- refactored nzp logic