fixed minor syntax errors in main2