modified gen() to have section_name as parameter and implemented ability to ignore nullflavor in testing