code refactoring : simplify server code