decoding seems to work with multiple orders now
some work on special cases though
and deuglification