start to separate parsing and file generation