added selected question logic