implemented js_encode_symbol and js_decode_symbol