Adds a function to group the questions