add documentation and error messages