to_binary is deprecated