private void pairWithButtons() { foreach (var level in skillsByLevel) { var pairedLevel = level .Select(skillNode => { var button = SkillButton.getSkillButton(skillNode.getSkill(), skill => { onSkillPicked.Invoke(skill); }); skillNodeToButton.Add(skillNode, button); return(new Tuple <SkillNode, SkillButton>(skillNode, button)); }) .ToList(); nodesWithButtons.Add(pairedLevel); } }