this is the source code of my graduate thesis. Appreciate for criticisms and discussion.