Add decode. Not tested