insert nodes and node entities