make decode method public