mark active questions and sort them correctly