a tool of encoder