Added decode method