added a reverse flag to group, and a rgroup query term