test method checkWN systematically. Added test cases. Fixed bugs. Now most have been tested except only one case left. I need to further confirm how it should handle the case.