core tests pass again
rewritten unary codec