fix remaining undocumented portions of the code