added key function to data for node and links