Refactoring server, change api
Fix