modified format of kengen.py