Somewhat working bheap
added dist to bheap struct