private DisplayMode getDisplayMode(int width, int height, int bpp, int freq) {
        try {
            for (DisplayMode displayMode : Display.getAvailableDisplayModes()) {
                if (displayMode.getWidth() == width && displayMode.getHeight() == height && displayMode.getBitsPerPixel() == bpp &&
                        displayMode.getFrequency() == freq && displayMode.isFullscreenCapable() == true) {
                    return displayMode;
                }
            }
        } catch (LWJGLException e) {

        }
        Console.log("Display mode was unavailable");

        return new DisplayMode(width, height);
    }