public void openAlgorithm() {
        int value = programLoader.showOpenDialog(null);
        if (value == JFileChooser.APPROVE_OPTION) {
            File file = programLoader.getSelectedFile();
            AlgReader algReader = null;

            try {
                algReader = new AlgReader(file);
            } catch (FileNotFoundException e) {
                e.printStackTrace();
            }

            try {
                read(algReader);
            } catch (Exception e) {
                settings.clear();
            }
            GUI.controls.refresh();
            GUI.gRepaint();
            program.compile();
        }
        GUI.controls.refresh();
        GUI.gRepaint();
    }