Try again at implementing decoder