[NEW] added the code for data structure written by yanweimin