Yilong tuffy port

This is a temporary pull request to review the changes.
@feiranwang @gengyl08 : Is this change correct? from "id" to "weight" ???