Output format updated, all test passed;
//TODO refactoring, more test