remove global, fixes #9
Merge pull request #11 from weisjohn/upstream_master

remove global, fixes #9