uncommented code that sets the id when editing a node