remove unnecessary free()
initialize nodes with {}