completes documents
completes main functionalities and test cases;