changed correct answer algorithm