decode method