added documents and improved header files