implemented client side reply encoding both for single and multiple values