Improving the model to add the decoder