optimization for questions

moved if statement to separate function to allow division to generate
new questions with the same number of digits. needs runtime conf.