Made stack/heap example advanced