final documentation and code