better type checking
better documentation in README.md