Added dialog to allow choosing number of trials