documentation and code update