Adding logic to check the correct answer