added heap - not sure how good it is