complete re-write
nodes now calculate their own differences instead of using a universal one