generate documentation from legacy code