updated protocol to use binary instead of unicode strings for data