added tests
updated documents, added tests