made it a bit more python 2.7 friendly