conversion str->bytes to avoid problems in Python 3