add dict data support
code clean and add comments