encoding response