a little bit more python3 friendly