public ArrayList<ArrayList<Move>> parseOpenings(){
		
		ArrayList<ArrayList<Move>> allOpeningMoves = new ArrayList<ArrayList<Move>>();
		List<PGNGame> games = null;
		
		BufferedReader reader = null;
		String pgn = "";
		
		try {
			
			reader = new BufferedReader(new FileReader(db));
			int j = 0;
			StringBuilder sb = new StringBuilder();
			//50007
			//120
			while(reader.ready() && j<50007){
				j++;
				String line = reader.readLine();
				sb.append(line+"\n");

			}
			pgn = sb.toString();
			reader.close();
		} catch (IOException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		try {
			games = PGNParser.parse(pgn);
		} catch (Exception e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}

		for(PGNGame game: games){
			Iterator<PGNMove> iterator = game.getMovesIterator();
			ArrayList<Move> moves = new ArrayList<Move>();
			int i = 0;
			while(iterator.hasNext() && i<OPENINGMOVES){
				i++;
				PGNMove pgnmove = iterator.next();
				Move move = parseMove(pgnmove);
				moves.add(move);
			}
			allOpeningMoves.add(moves);
		}
		return allOpeningMoves;
	}