adding Py3k compat and fixing #2