refactor native code
refactor native code --init method
fix an issue
add test
add native example
merge