refactoring for server ops