changed to heap