chap9-6, it is more difficult than I think, need to recheck this out later, thought I've implement it.