Rewrite encode to 36