add document and comments.
add header file and comments