Added some globals, added an example, some explanation