add thrift mode