try to improve thrift python/php client