add documentation, close #1