documentation and variable renaming