change result encoding and add response signature to the protocol