Filling out heap functionality