some optimisations to prio queue
nice mess
simple iterator for t_a_heap