adding the main of exercise 9 of ar project to the code