add comments for functions
Merge pull request #43 from ZhengYang/master

add comments for functions