public static Question getNextQuestion()
    {
        if (questions == null || ++position >= questions.size())
        {
            Runnable getQuestionRunnable = new Runnable()
            {
                public void run()
                {
                    position = 0;
                    questions = DatabaseManager.getRandomQuestions(50, Type.BRAIN); //todo remove this hardcode

                    loadingDialog.dispose();
                }
            };

            Thread getQuestionThread = new Thread(getQuestionRunnable);
            getQuestionThread.start();
            
            loadingDialog.showDialog();
        }

        return questions.get(position);
    }