refactored server classes