Modify to a runable version exercise 4.4 ~ 4.8