modified test4NCAP.java