progress on decoder
core decoder done, untested. need to fix build