heap structures implementations and tests