make it more pythonic
Merge pull request #1 from mjvm/master

minor fixes