Implement decoder