free function receives node, not only the value