better to_b for string