Implement decoding