added logic to only select next question and updated logic to update score dynamically