added main.cc for mtag_generate