public UserRatingsTable getRatingsForUsers() throws FileNotFoundException {
        List<MovieRatingLine> ratingLines = new ArrayList<MovieRatingLine>();
        List<String> movieTitles = new ArrayList<String>();

        File fileToRead = new File(fileName);
        Scanner scanner = new Scanner(fileToRead);
        int maxId = 0;
        int maxUserId = 0;

        String[] userIdsArray = scanner.nextLine().split(",", 0);
        List<Integer> userIds = new ArrayList<Integer>();
        for (int i = 1; i < userIdsArray.length; i++) {
            userIds.add(Integer.parseInt(userIdsArray[i].replace("\"", "")));
        }

        while (scanner.hasNextLine()) {
            MovieRatingLine ratingLine = new MovieRatingLine(scanner.nextLine());
            ratingLines.add(ratingLine);
            movieTitles.add(ratingLine.getMovieName());
        }
        scanner.close();

        List<UserRatingsList> ratingsTable = new ArrayList<UserRatingsList>();
        for (int i = 0; i < userIds.size(); i++) {
            ratingsTable.add(new UserRatingsList());
        }

        for (int i = 0; i < ratingLines.size(); i++) {
            for (Integer userId : ratingLines.get(i).getUserRatings().keySet()) {
                ratingsTable.get(userId).getRatingsMap().put(i, ratingLines.get(i).getUserRatings().get(userId));
            }
        }

        return new UserRatingsTable(ratingsTable, userIds, movieTitles);
    }