public List<Integer> seatChoices() {
        List<Integer> availableSeats = new ArrayList<Integer>();
        try {
            Class.forName("com.mysql.jdbc.Driver");
        } catch (ClassNotFoundException e) {
            System.out.println("Where is your MySQL JDBC Driver?");
            e.printStackTrace();

        }
        PreparedStatement ps = null;
        Connection con = null;
        ResultSet rs;
        List<Integer> takenSeats = new ArrayList<Integer>();
        try {

            con = DriverManager.getConnection("jdbc:mysql://mysql2.cs.stonybrook.edu:3306/mlavina", "mlavina", "108262940");
            if (con != null) {
                con.setAutoCommit(false);

                String sql = "SELECT SeatNo \n"
                        + "FROM includes I, reservationpassenger R\n"
                        + "WHERE R.ResrNo = I.ResrNo AND I.FlightNo = ? ";

                ps = con.prepareStatement(sql);
                ps.setInt(1, selectedFlight.flightNo);

                try {
                    ps.execute();

                    rs = ps.getResultSet();
                    while (rs.next()) {
                        takenSeats.add(rs.getInt("SeatNo"));
                    }
                    rs.close();

                    sql = "SELECT NoOfSeats \n"
                            + "FROM flight f, airline A\n"
                            + "WHERE f.FlightNo = ? AND f.AirlineID= A.Id AND A.name = ?";

                    ps = con.prepareStatement(sql);
                    ps.setInt(1, selectedFlight.flightNo);
                    ps.setString(2, selectedFlight.airline);
                    ps.execute();
                    rs = ps.getResultSet();
                    if (rs.next()) {
                        for (int i = rs.getInt("NoOfSeats"); i > 0; i--) {
                            if (takenSeats.contains(i)) {
                                continue;
                            } else {
                                availableSeats.add(i);
                            }
                        }
                    }
                    con.commit();
                } catch (Exception e) {
                    con.rollback();
                }

            }

        } catch (Exception e) {
            System.out.println(e);
        } finally {
            try {
                con.setAutoCommit(true);
                con.close();
                ps.close();
            } catch (Exception e) {
                e.printStackTrace();
            }
        }

        return availableSeats;
    }