rename UNSAFE, improve encoder
UNSAFE rename