add mask and getNNF