rewritten method for adding env nodes and assigned roles