server refactoring
server refactoring