public static void distributeFilesAmongPeers(Map<Integer, TrackedFile> trackedFileMap, Map<Integer, Peer> mapOfPeers) {
        Random moduloGenerator = new Random();

        for (int fileId = 1; fileId <= Main.MAX_NO_OF_FILES; fileId++) {

            int outerCoinToss = moduloGenerator.nextInt(Main.FILE_AVAILABILITY_MODULO);
            if (outerCoinToss >= Main.FILE_SHARE_PROBABILITY) {
                int numberOfSharingPeers = moduloGenerator.nextInt(Main.MAX_NO_OF_PEERS);

                for (int counter = 0; counter < numberOfSharingPeers; counter++) {
                    Integer peerId = moduloGenerator.nextInt(Main.MAX_NO_OF_PEERS) + 1;

                    Peer peer = mapOfPeers.get(peerId);
                    int innerCoinToss = moduloGenerator.nextInt(Main.FILE_AVAILABILITY_MODULO);
                    if (innerCoinToss >= Main.FILE_SHARE_PROBABILITY && peer != null) {
                        TrackedFile trackedFile = trackedFileMap.get(fileId);
                        if (trackedFile != null && trackedFile.getSeeders() != null) {

                            int possibleStorageUsed = peer.getCurrentUsedStorage() + trackedFile.getFileSize();
                            if (possibleStorageUsed <= peer.getStorageCapacity()) {
                                trackedFile.getSeeders().put(peer.getId(), peer);

                                SharedFile file = new SharedFile();
                                file.setId(fileId);
                                file.setSize(trackedFile.getFileSize());
                                file.setUploadedSize(0);
                                peer.getSharedFiles().put(fileId, file);
                            }


                        }
                    }
                }
            }
        }

        /*for (Peer peer : mapOfPeers.values()) {
            for (int fileId = 1; fileId <= MAX_NO_OF_FILES; fileId++) {
                if (fileId % (moduloGenerator.nextInt(FILE_AVAILABILITY_MODULO) + 1) == 0 && peer != null) {
                    TrackedFile trackedFile = trackedFileMap.get(fileId);
                    if (trackedFile != null && trackedFile.getSeeders() != null) {
                        trackedFile.getSeeders().put(peer.getId(), peer);

                        SharedFile file = new SharedFile();
                        file.setId(fileId);
                        file.setSize(trackedFile.getFileSize());
                        file.setUploadedSize(0);
                        peer.getSharedFiles().put(fileId, file);
                    }
                }
            }
        }*/
    }