updated heap.py after group revisions