First version of display_stack function