make it work correctly for list inputs
implement the significantly simpler decoder