@Override
    public List<Course> getFreeCourse() throws SQLException {
        List<Course> courseList = new ArrayList<>();
        Connection connect = null;
        PreparedStatement statement = null;
        try {
            Class.forName(Params.bundle.getString("urlDriver"));
            connect = DriverManager.getConnection(Params.bundle.getString("urlDB"),
                    Params.bundle.getString("userDB"), Params.bundle.getString("passwordDB"));

            String selectAllCourseCatalogStr = "select * from course_catalog";

            statement = connect.prepareStatement(selectAllCourseCatalogStr);

            ResultSet result = statement.executeQuery();
            List<Integer> selectAllCourseCatalog = new ArrayList();
            while (result.next()){
                selectAllCourseCatalog.add(result.getInt("course_catalog.general_course_catalog_id"));
            }

            String selectAllGeneralCourseCatalogStr = "select * from general_course_catalog";

            statement = connect.prepareStatement(selectAllGeneralCourseCatalogStr);

            result = statement.executeQuery();
            List<Course> selectAllGeneralCourseCatalog = new ArrayList<>();
            while (result.next()){
                int course_id = result.getInt("general_course_catalog.id");
                if(!selectAllCourseCatalog.contains(course_id)) {
                    String title = result.getString("general_course_catalog.title");
                    Course course = new Course();
                    course.setId(course_id);
                    course.setTitle(title);
                    courseList.add(course);
                }
            }

        } catch (ClassNotFoundException e) {
            e.printStackTrace();
        } catch (SQLException e) {
            e.printStackTrace();
        }finally {
            if(connect != null)
                connect.close();
            if(statement != null)
                statement.close();
            return courseList;
        }
    }