multiple choice algorithm