documentation
documentation
cleaned up scoping of variables