refactoring api and fix socket bug
update version