added add a node function need to test it.