add support for thrift protocol