rewrite type -> jws