fix name error: global name `self` does not exist
Merge pull request #21 from simonz05/working

fix name error: global name `self` does not exist