adding comments and main method