Implemented the private metodh create_new_node