changed node x acessor to take reference rather than the index
merge