Update documentation and change return value