added print_stack