made heap walker accept a callback