[feature] remove dead code
[feature] reimpl for lua extension