added documentation. This closes #1