public int addShard(String address, int port) throws IOException {
        sClients.add(new SocketClient(address, port));
        ++shardAmount;
        for (int i = 0; i < sClients.size(); i ++){
            String keysString = getKeysFromShard(i);
            if (keysString == "4")
                    return 4;
            //DataPartition.constructRangeRing(shardAmount);
            DataPartition.constructHashMap(shardAmount);
            Set <String> keysSet = parseKeys(keysString);
            for (String key : keysSet){
                int shardNumber = getShardNumberForKey(key);
                if (shardNumber != i){
                    String value = getValueFromShard(key, i);
                    delValueOnShard(key, i);
                    addValue(key, value);
                }
            }
        }
        return 0;
    }