add comments in main function