public static LinkedList createRate(String filename, double[] percentage)
    {
        if (percentage == null) {
            return null;
        }

        LinkedList routerList = null;
        try
        {
            // check whether the total percentage is greater than 100%
            double total = 0;
            int MAX_LIMIT = 100;
            for (int i = 0; i < percentage.length; i++)
            {
                total += percentage[i];
                if (total > MAX_LIMIT)
                {
                    System.out.println("NetworkReader: total percentage = " +
                                        total + ", which is > 100%");
                    return null;
                }
            }

            FileReader fileReader = new FileReader(filename);
            BufferedReader buffer = new BufferedReader(fileReader);
            routerList = createNetworkRate(buffer,percentage.length,percentage);
        }
        catch (Exception exp)
        {
            System.out.println("NetworkReader: File not found or " +
                               "percentage[] is null.");
            routerList = null;
        }

        return routerList;
    }