added method to check a list of heaps