generate list of element groups