add documentation and fix #1