Added main method in chapter 5 work.