1.critical error in previous version
when declare a new pointer of node, we need to allocate full size of the variable, not just the size of the pointer itself.