Further implementation of decoder and thus toy example