decoder: rewrite for new-style results