add "decode" and test case