new commit to handle various small bugs including reversed items and duplicate rangegroups