public static DisplayMode doesDisplayModeExist(EngineConfiguration config) throws LWJGLException{

        DisplayMode[] modes = Display.getAvailableDisplayModes();
        DisplayMode chosen = null;

        for(DisplayMode mode : modes){
            int width = mode.getWidth();
            int height = mode.getHeight();

            if(width == config.DISPLAY_WIDTH && height == config.DISPLAY_HEIGHT){
                if(chosen == null){
                    chosen = mode;
                }else{
                    if(isDisplayModeBetter(chosen, mode)){
                        chosen = mode;
                    }
                }
            }

        }

        return chosen;

    }