Add tests
Add decode method