remove dead code in main