add documentation
fix typo in variable name