refactored server code