run mode, add gdb debug mode
refectoring, change function order. change stack function type to void