Implement decode method