hw18: heap stuff