Initial code for address generation: to be integrated into the node