refactored server client package