start of nifty heap stuff