refine the npp plugin