Adding code to group questions based on 1/2 logic; adding code to rearrange after threshold value is exceeded