Added Node creation logic