use object variable in place of global
Merge pull request #9 from sualko/master

use object variable in place of global