updated Makfile, add a handler for the heap state