Update documentation and add test