modified the group selector to select elements within collapsed groups