server refactor
refactor server