Finished the assignment2, please run test() in test.R