_model has to get encoded as well