gen output file
by bcint and by ws