edit the working project

-change control structure syntax
-format the output
-add some comments