changed global attribute name
added docstrings