refactored server for config