adding test
make py3 compatibility code more uniform