Closer and closer to Grammar Encoder (still not wroking though)