mapping nodes to parents - and moved code to main website continuing dev there