reworked function so it would display correct answer