complete datastructure and modify some grammar