should probably use `compat.text_type` here