refactor the sdk
merge the code.