Improve documentation
fix a bug